<!DOCTYPE html><html class=split lang=en-US-x-hixie><script src=../link-fixup.js defer=""></script>
<!-- Mirrored from html.spec.whatwg.org/multipage/system-state.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 10 Sep 2025 08:35:53 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<meta charset=utf-8><meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name=viewport><title>HTML Standard</title><meta content=#3c790a name=theme-color><meta content="light dark" name=color-scheme><link rel=stylesheet href=../../resources.whatwg.org/standard-shared-with-dev.css crossorigin=""><link rel=stylesheet href=../../resources.whatwg.org/standard.css crossorigin=""><link rel=stylesheet href=../../resources.whatwg.org/spec.css crossorigin=""><link rel=icon href=https://resources.whatwg.org/logo.svg crossorigin=""><link rel=stylesheet href=../styles.css crossorigin=""><script>
   function toggleStatus(div) {
     div.parentNode.classList.toggle('wrapped');
   }
   function setLinkFragment(link) {
     link.hash = location.hash;
   }
  </script><body>
  
  <script defer="" crossorigin="" src=../html-dfn.js></script>
  
  <header id=head class="head with-buttons">
   <a href=https://whatwg.org/ class=logo><img width=100 alt=WHATWG crossorigin="" class=darkmode-aware src=https://resources.whatwg.org/logo.svg height=100></a>
   <hgroup><h1 class=allcaps>HTML</h1><p id=living-standard>Living Standard — Last Updated <span class=pubdate>10 September 2025</span></hgroup>
   
   

   
  </header>

  

  

  

  
  

  
  

  

  <nav><a href=timers-and-user-prompts.html>← 8.6 Timers</a> — <a href=index.html>Table of Contents</a> — <a href=imagebitmap-and-animations.html>8.10 Images →</a></nav><ol class=toc><li id=toc-webappapis><ol><li><a href=system-state.html#system-state-and-capabilities><span class=secno>8.9</span> System state and capabilities</a><ol><li><a href=system-state.html#the-navigator-object><span class=secno>8.9.1</span> The <code>Navigator</code> object</a><ol><li><a href=system-state.html#client-identification><span class=secno>8.9.1.1</span> Client identification</a><li><a href=system-state.html#language-preferences><span class=secno>8.9.1.2</span> Language preferences</a><li><a href=system-state.html#navigator.online><span class=secno>8.9.1.3</span> Browser state</a><li><a href=system-state.html#custom-handlers><span class=secno>8.9.1.4</span> Custom scheme handlers: the <code>registerProtocolHandler()</code> method</a><ol><li><a href=system-state.html#security-and-privacy><span class=secno>8.9.1.4.1</span> Security and privacy</a><li><a href=system-state.html#user-agent-automation><span class=secno>8.9.1.4.2</span> User agent automation</a></ol><li><a href=system-state.html#cookies><span class=secno>8.9.1.5</span> Cookies</a><li><a href=system-state.html#pdf-viewing-support><span class=secno>8.9.1.6</span> PDF viewing support</a></ol></ol></ol></ol><h3 id=system-state-and-capabilities><span class=secno>8.9</span> System state and capabilities<a href=#system-state-and-capabilities class=self-link></a></h3>

  <h4 id=the-navigator-object><span class=secno>8.9.1</span> The <code id=the-navigator-object:navigator><a href=#navigator>Navigator</a></code> object<a href=#the-navigator-object class=self-link></a></h4><div class="mdn-anno wrapped"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator title="The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.">Navigator</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span><hr><span class="opera yes"><span>Opera</span><span>3+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>4+</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>10.1+</span></span></div></div></div>

  <p>Instances of <code id=the-navigator-object:navigator-2><a href=#navigator>Navigator</a></code> represent the identity and state of the user agent (the
  client). It has also been used as a generic global under which various APIs are located, but this
  is not precedent to build upon. Instead use the <code id=the-navigator-object:windoworworkerglobalscope><a href=webappapis.html#windoworworkerglobalscope>WindowOrWorkerGlobalScope</a></code> mixin or
  equivalent.</p>

  <pre><code class='idl'>[<c- g>Exposed</c->=<c- n>Window</c->]
<c- b>interface</c-> <dfn id='navigator' data-dfn-type='interface'><c- g>Navigator</c-></dfn> {
  // objects implementing this interface also implement the interfaces given below
};
<a href='#navigator' id='the-navigator-object:navigator-3'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatorid' id='the-navigator-object:navigatorid'><c- n>NavigatorID</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-4'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatorlanguage' id='the-navigator-object:navigatorlanguage'><c- n>NavigatorLanguage</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-5'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatoronline' id='the-navigator-object:navigatoronline'><c- n>NavigatorOnLine</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-6'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatorcontentutils' id='the-navigator-object:navigatorcontentutils'><c- n>NavigatorContentUtils</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-7'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatorcookies' id='the-navigator-object:navigatorcookies'><c- n>NavigatorCookies</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-8'><c- n>Navigator</c-></a> <c- b>includes</c-> <a href='#navigatorplugins' id='the-navigator-object:navigatorplugins'><c- n>NavigatorPlugins</c-></a>;
<a href='#navigator' id='the-navigator-object:navigator-9'><c- n>Navigator</c-></a> <c- b>includes</c-> <a id='the-navigator-object:navigatorconcurrenthardware' href='workers.html#navigatorconcurrenthardware'><c- n>NavigatorConcurrentHardware</c-></a>;</code></pre>

  

  <p class=note>These interface mixins are defined separately so that <code id=the-navigator-object:workernavigator><a href=workers.html#workernavigator>WorkerNavigator</a></code> can reuse parts of
  the <code id=the-navigator-object:navigator-10><a href=#navigator>Navigator</a></code> interface.</p>

  <p>Each <code id=the-navigator-object:window><a href=nav-history-apis.html#window>Window</a></code> has an <dfn id=associated-navigator>associated <code>Navigator</code></dfn>, which is a <code id=the-navigator-object:navigator-11><a href=#navigator>Navigator</a></code>
  object. Upon creation of the <code id=the-navigator-object:window-2><a href=nav-history-apis.html#window>Window</a></code> object, its <a href=#associated-navigator id=the-navigator-object:associated-navigator>associated <code>Navigator</code></a> must be
  set to a <a id=the-navigator-object:new href=https://webidl.spec.whatwg.org/#new data-x-internal=new>new</a> <code id=the-navigator-object:navigator-12><a href=#navigator>Navigator</a></code> object created in the <code id=the-navigator-object:window-3><a href=nav-history-apis.html#window>Window</a></code> object's <a href=webappapis.html#concept-relevant-realm id=the-navigator-object:concept-relevant-realm>relevant realm</a>.</p>

  <div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator title="The Window.navigator read-only property returns a reference to the Navigator object, which has methods and properties about the application running the script.">Window/navigator</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span><hr><span class="opera yes"><span>Opera</span><span>3+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>4+</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>10.1+</span></span></div></div></div><p>The <dfn data-dfn-for=Window id=dom-navigator data-dfn-type=attribute><code>navigator</code></dfn> and <dfn data-dfn-for=Window id=dom-clientinformation data-dfn-type=attribute><code>clientInformation</code></dfn> getter steps are to return
  <a id=the-navigator-object:this href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a href=#associated-navigator id=the-navigator-object:associated-navigator-2>associated <code>Navigator</code></a>.

  </p>


  <h5 id=client-identification><span class=secno>8.9.1.1</span> Client identification<a href=#client-identification class=self-link></a></h5>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatorid' data-dfn-type='interface'><c- g>NavigatorID</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-appcodename' id='client-identification:dom-navigator-appcodename'><c- g>appCodeName</c-></a>; // constant &quot;Mozilla&quot;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-appname' id='client-identification:dom-navigator-appname'><c- g>appName</c-></a>; // constant &quot;Netscape&quot;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-appversion' id='client-identification:dom-navigator-appversion'><c- g>appVersion</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-platform' id='client-identification:dom-navigator-platform'><c- g>platform</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-product' id='client-identification:dom-navigator-product'><c- g>product</c-></a>; // constant &quot;Gecko&quot;
  [<c- g>Exposed</c->=<c- n>Window</c->] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-productsub' id='client-identification:dom-navigator-productsub'><c- g>productSub</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-useragent' id='client-identification:dom-navigator-useragent'><c- g>userAgent</c-></a>;
  [<c- g>Exposed</c->=<c- n>Window</c->] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-vendor' id='client-identification:dom-navigator-vendor'><c- g>vendor</c-></a>;
  [<c- g>Exposed</c->=<c- n>Window</c->] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-vendorsub' id='client-identification:dom-navigator-vendorsub'><c- g>vendorSub</c-></a>; // constant &quot;&quot;
};</code></pre>

  <p>In certain cases, despite the best efforts of the entire industry, web browsers have bugs and
  limitations that web authors are forced to work around.</p>

  <p>This section defines a collection of attributes that can be used to determine, from script, the
  kind of user agent in use, in order to work around these issues.</p>

  

  <p>The user agent has a <dfn id=concept-navigator-compatibility-mode>navigator compatibility
  mode</dfn>, which is either <i>Chrome</i>, <i>Gecko</i>, or <i>WebKit</i>.</p>

  <p class=note>The <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode>navigator compatibility
  mode</a> constrains the <code id=client-identification:navigatorid><a href=#navigatorid>NavigatorID</a></code> mixin to the combinations of attribute
  values and presence of <code id=client-identification:dom-navigator-taintenabled><a href=#dom-navigator-taintenabled>taintEnabled()</a></code> and <code id=client-identification:dom-navigator-oscpu><a href=#dom-navigator-oscpu>oscpu</a></code> that are known to be compatible with existing web
  content.</p>

  

  <p>Client detection should always be limited to detecting known current versions; future versions
  and unknown versions should always be assumed to be fully compliant.</p>

  <dl class=domintro><dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator>navigator</a>.<a href=#dom-navigator-appcodename id=dom-navigator-appcodename-dev>appCodeName</a></code><dd><p>Returns the string "<code>Mozilla</code>".<dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator-2>navigator</a>.<a href=#dom-navigator-appname id=dom-navigator-appname-dev>appName</a></code><dd><p>Returns the string "<code>Netscape</code>".<dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator-3>navigator</a>.<a href=#dom-navigator-appversion id=dom-navigator-appversion-dev>appVersion</a></code><dd><p>Returns the version of the browser.<dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator-4>navigator</a>.<a href=#dom-navigator-platform id=dom-navigator-platform-dev>platform</a></code><dd><p>Returns the name of the platform.<dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator-5>navigator</a>.<a href=#dom-navigator-product id=dom-navigator-product-dev>product</a></code><dd><p>Returns the string "<code>Gecko</code>".<dt><code><var>window</var>.<a href=#dom-navigator id=client-identification:dom-navigator-6>navigator</a>.<a href=#dom-navigator-productsub id=dom-navigator-productsub-dev>productSub</a></code><dd><p>Returns either the string "<code>20030107</code>", or the string "<code>20100101</code>".<dt><code><var>self</var>.<a href=#dom-navigator id=client-identification:dom-navigator-7>navigator</a>.<a href=#dom-navigator-useragent id=dom-navigator-useragent-dev>userAgent</a></code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent title="The Navigator.userAgent read-only property returns the user agent string for the current browser.">Navigator/userAgent</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span><hr><span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>4+</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>12.1+</span></span></div></div><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/userAgent title="The WorkerNavigator.userAgent read-only property returns the user agent string for the current browser.">WorkerNavigator/userAgent</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>4+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span><hr><span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>10+</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios yes"><span>Safari iOS</span><span>5+</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>12.1+</span></span></div></div></div><dd><p>Returns the complete `<code>User-Agent</code>` header.<dt><code><var>window</var>.<a href=#dom-navigator id=client-identification:dom-navigator-8>navigator</a>.<a href=#dom-navigator-vendor id=dom-navigator-vendor-dev>vendor</a></code><dd><p>Returns either the empty string, the string "<code>Apple Computer, Inc.</code>",
   or the string "<code>Google Inc.</code>".<dt><code><var>window</var>.<a href=#dom-navigator id=client-identification:dom-navigator-9>navigator</a>.<a href=#dom-navigator-vendorsub id=dom-navigator-vendorsub-dev>vendorSub</a></code><dd><p>Returns the empty string.</dl>

  

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-appcodename data-dfn-type=attribute><code>appCodeName</code></dfn> getter steps are to return
  "<code>Mozilla</code>".</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-appname data-dfn-type=attribute><code>appName</code></dfn>
  getter steps are to return "<code>Netscape</code>".</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-appversion data-dfn-type=attribute><code>appVersion</code></dfn> getter steps are:</p>

  <ol><li><p>If the <a href=https://fetch.spec.whatwg.org/#default-user-agent-value id=client-identification:default-user-agent-value data-x-internal=default-user-agent-value>default `<code>User-Agent</code>`
   value</a> does not start with `<code>Mozilla/5.0 (</code>`, then return the empty
   string.<li><p>Let <var>trail</var> be the substring of the <a href=https://fetch.spec.whatwg.org/#default-user-agent-value id=client-identification:default-user-agent-value-2 data-x-internal=default-user-agent-value>default `<code>User-Agent</code>` value</a>, <a href=https://infra.spec.whatwg.org/#isomorphic-decode id=client-identification:isomorphic-decode data-x-internal=isomorphic-decode>isomorphic decoded</a>, that follows the "<code>Mozilla/</code>" prefix.<li>
    <dl class=switch><dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-2>navigator compatibility
     mode</a> is <i>Chrome</i> or <i>WebKit</i><dd><p>Return <var>trail</var>.<dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-3>navigator compatibility
     mode</a> is <i>Gecko</i><dd>
      <p>If <var>trail</var> starts with "<code>5.0 (Windows</code>", then return "<code>5.0 (Windows)</code>".</p>

      <p>Otherwise, return the prefix of <var>trail</var> up to but not including the first U+003B
      (;), concatenated with the character U+0029 RIGHT PARENTHESIS. For example, "<code>5.0 (Macintosh)</code>", "<code>5.0 (Android 10)</code>", or "<code>5.0 (X11)</code>".</p> 
     </dl>
   </ol>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-platform data-dfn-type=attribute><code>platform</code></dfn>
  getter steps are to return a string representing the platform on which the
  browser is executing (e.g. "<code>MacIntel</code>", "<code>Win32</code>",
  "<code>Linux x86_64</code>", "<code>Linux armv81</code>") or, for privacy and
  compatibility, a string that is commonly returned on another platform.</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-product data-dfn-type=attribute><code>product</code></dfn>
  getter steps are to return "<code>Gecko</code>".</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-productsub data-dfn-type=attribute><code>productSub</code></dfn>
  getter steps are to return the appropriate string from the following list:</p>

   <dl class=switch><dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-4>navigator compatibility
     mode</a> is <i>Chrome</i> or <i>WebKit</i><dd><p>The string "<code>20030107</code>".<dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-5>navigator compatibility
     mode</a> is <i>Gecko</i><dd><p>The string "<code>20100101</code>".</dl>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-useragent data-dfn-type=attribute><code>userAgent</code></dfn>
  getter steps are to return the <a href=https://fetch.spec.whatwg.org/#default-user-agent-value id=client-identification:default-user-agent-value-3 data-x-internal=default-user-agent-value>default `<code>User-Agent</code>`
  value</a>.</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-vendor data-dfn-type=attribute><code>vendor</code></dfn>
  getter steps are to return the appropriate string from the following list:</p>

   <dl class=switch><dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-6>navigator compatibility
     mode</a> is <i>Chrome</i><dd><p>The string "<code>Google Inc.</code>".<dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-7>navigator compatibility
     mode</a> is <i>Gecko</i><dd><p>The empty string.<dt>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-8>navigator compatibility
     mode</a> is <i>WebKit</i><dd><p>The string "<code>Apple Computer, Inc.</code>".</dl>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-vendorsub data-dfn-type=attribute><code>vendorSub</code></dfn>
  getter steps are to return the empty string.</p>

  <p>If the <a href=#concept-navigator-compatibility-mode id=client-identification:concept-navigator-compatibility-mode-9>navigator compatibility mode</a>
  is <i>Gecko</i>, then the user agent must also support the following partial interface:</p>

  <pre><code class='idl'><c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a href='#navigatorid' id='NavigatorID-partial'><c- g>NavigatorID</c-></a> {
  [<c- g>Exposed</c->=<c- n>Window</c->] <c- b>boolean</c-> <a href='#dom-navigator-taintenabled' id='client-identification:dom-navigator-taintenabled-2'><c- g>taintEnabled</c-></a>(); // constant false
  [<c- g>Exposed</c->=<c- n>Window</c->] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-oscpu' id='client-identification:dom-navigator-oscpu-2'><c- g>oscpu</c-></a>;
};</code></pre>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-taintenabled data-dfn-type=method><code>taintEnabled()</code></dfn> method must return false.</p>

  <p>The <dfn data-dfn-for=NavigatorID id=dom-navigator-oscpu data-dfn-type=attribute><code>oscpu</code></dfn> attribute's getter must return
  either the empty string or a string representing the platform on which the browser is executing,
  e.g. "<code>Windows NT 10.0; Win64; x64</code>", "<code>Linux
  x86_64</code>".</p>

  
  <p class=warning>
  <a id=client-identification:tracking-vector title="There is a tracking vector here." href=https://infra.spec.whatwg.org/#tracking-vector class=tracking-vector data-x-internal=tracking-vector><img width=46 alt="(This is a tracking vector.)" crossorigin="" class=darkmode-aware src=https://resources.whatwg.org/tracking-vector.svg height=64></a>
  Any information in this API that varies from user to user can be used to profile the user. In
  fact, if enough such information is available, a user can actually be uniquely identified. For
  this reason, user agent implementers are strongly urged to include as little information in this
  API as possible.</p>

  

  

  <h5 id=language-preferences><span class=secno>8.9.1.2</span> Language preferences<a href=#language-preferences class=self-link></a></h5>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatorlanguage' data-dfn-type='interface'><c- g>NavigatorLanguage</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-navigator-language' id='language-preferences:dom-navigator-language'><c- g>language</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<c- b>DOMString</c->&gt; <a href='#dom-navigator-languages' id='language-preferences:dom-navigator-languages'><c- g>languages</c-></a>;
};</code></pre>

  <dl class=domintro><dt><code><var>self</var>.<a href=#dom-navigator id=language-preferences:dom-navigator>navigator</a>.<a href=#dom-navigator-language id=dom-navigator-language-dev>language</a></code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language title="The Navigator.language read-only property returns a string representing the preferred language of the user, usually the language of the browser UI.">Navigator/language</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span><hr><span class="opera yes"><span>Opera</span><span>4+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>11</span></span><hr><span class="firefox_android yes"><span>Firefox Android</span><span>4+</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>10.1+</span></span></div></div><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/language title="The WorkerNavigator.language read-only property returns a string representing the preferred language of the user, usually the language of the browser UI.">WorkerNavigator/language</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>10+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span><hr><span class="opera yes"><span>Opera</span><span>4+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>11</span></span><hr><span class="firefox_android yes"><span>Firefox Android</span><span>4+</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>10.1+</span></span></div></div></div><dd><p>Returns a language tag representing the user's preferred language.<dt><code><var>self</var>.<a href=#dom-navigator id=language-preferences:dom-navigator-2>navigator</a>.<a href=#dom-navigator-languages id=dom-navigator-languages-dev>languages</a></code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages title="The Navigator.languages read-only property returns an array of strings representing the user's preferred languages. The language is described using language tags according to RFC 5646: Tags for Identifying Languages (also known as BCP 47). In the returned array they are ordered by preference with the most preferred language first.">Navigator/languages</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>32+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>37+</span></span><hr><span class="opera yes"><span>Opera</span><span>24+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>16+</span></span><span class="ie no"><span>Internet Explorer</span><span>No</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android yes"><span>WebView Android</span><span>37+</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>3.0+</span></span><span class="opera_android yes"><span>Opera Android</span><span>24+</span></span></div></div><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/languages title="The WorkerNavigator.languages read-only property returns an array of strings representing the user's preferred languages. The language is described using language tags according to RFC 5646: Tags for Identifying Languages (also known as BCP 47). In the returned array they are ordered by preference with the most preferred language first.">WorkerNavigator/languages</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>32+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>37+</span></span><hr><span class="opera yes"><span>Opera</span><span>24+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>16+</span></span><span class="ie no"><span>Internet Explorer</span><span>No</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android yes"><span>WebView Android</span><span>37+</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>3.0+</span></span><span class="opera_android yes"><span>Opera Android</span><span>24+</span></span></div></div></div><dd>
    <p>Returns an array of language tags representing the user's preferred languages, with the most
    preferred language first.</p>

    <p>The most preferred language is the one returned by <code id=language-preferences:dom-navigator-language-2><a href=#dom-navigator-language>navigator.language</a></code>.</p>
   </dl>

  <p class=note>A <code id=language-preferences:event-languagechange><a href=indices.html#event-languagechange>languagechange</a></code> event is fired at the
  <code id=language-preferences:window><a href=nav-history-apis.html#window>Window</a></code> or <code id=language-preferences:workerglobalscope><a href=workers.html#workerglobalscope>WorkerGlobalScope</a></code> object when the user agent's understanding
  of what the user's preferred languages are changes.</p>

  

  <p>The <dfn data-dfn-for=NavigatorLanguage id=dom-navigator-language data-dfn-type=attribute><code>language</code></dfn> getter steps are to return a valid BCP 47
  language tag representing either <a href=#a-plausible-language id=language-preferences:a-plausible-language>a plausible language</a> or the user's most preferred
  language. <a href=references.html#refsBCP47>[BCP47]</a></p>

  <p>The <dfn data-dfn-for=NavigatorLanguage id=dom-navigator-languages data-dfn-type=attribute><code>languages</code></dfn> getter steps are to
  return a <a id=language-preferences:frozen-array href=https://webidl.spec.whatwg.org/#dfn-frozen-array-type data-x-internal=frozen-array>frozen array</a> of valid BCP 47 language tags representing either one
  or more <a href=#a-plausible-language id=language-preferences:a-plausible-language-2>plausible languages</a>, or the user's preferred
  languages, ordered by preference with the most preferred language first. The same object must be
  returned until the user agent needs to return different values, or values in a different order.
  <a href=references.html#refsBCP47>[BCP47]</a></p>

  <p>Whenever the user agent needs to make the <code id=language-preferences:dom-navigator-languages-2><a href=#dom-navigator-languages>navigator.languages</a></code> attribute of a <code id=language-preferences:window-2><a href=nav-history-apis.html#window>Window</a></code>
  or <code id=language-preferences:workerglobalscope-2><a href=workers.html#workerglobalscope>WorkerGlobalScope</a></code> object <var>global</var> return a new set of language tags,
  the user agent must <a id=language-preferences:queue-a-global-task href=webappapis.html#queue-a-global-task>queue a global task</a> on the <a id=language-preferences:dom-manipulation-task-source href=webappapis.html#dom-manipulation-task-source>DOM manipulation task
  source</a> given <var>global</var> to <a href=https://dom.spec.whatwg.org/#concept-event-fire id=language-preferences:concept-event-fire data-x-internal=concept-event-fire>fire an event</a>
  named <code id=language-preferences:event-languagechange-2><a href=indices.html#event-languagechange>languagechange</a></code> at <var>global</var>, and wait
  until that task begins to be executed before actually returning a new value.</p>

  <p>To determine <dfn id=a-plausible-language>a plausible language</dfn>, the user agent should bear in mind the following:</p>

  <ul><li>
   <a id=language-preferences:tracking-vector title="There is a tracking vector here." href=https://infra.spec.whatwg.org/#tracking-vector class=tracking-vector data-x-internal=tracking-vector><img width=46 alt="(This is a tracking vector.)" crossorigin="" class=darkmode-aware src=https://resources.whatwg.org/tracking-vector.svg height=64></a>
   Any information in this API that varies from user to user can be used to profile or identify the
   user.<li>If the user is not using a service that obfuscates the user's point of origin (e.g. the Tor
   anonymity network), then the value that is least likely to distinguish the user from other users
   with similar origins (e.g. from the same IP address block) is the language used by the majority
   of such users. <a href=references.html#refsTOR>[TOR]</a><li>If the user is using an anonymizing service, then the value "<code>en-US</code>" is
   suggested; if all users of the service use that same value, that reduces the possibility of
   distinguishing the users from each other.</ul>

  <p>
  <a id=language-preferences:tracking-vector-2 title="There is a tracking vector here." href=https://infra.spec.whatwg.org/#tracking-vector class=tracking-vector data-x-internal=tracking-vector><img width=46 alt="(This is a tracking vector.)" crossorigin="" class=darkmode-aware src=https://resources.whatwg.org/tracking-vector.svg height=64></a>
  To avoid introducing any more fingerprinting vectors, user agents should use the same list for the
  APIs defined in this function as for the HTTP `<code id=language-preferences:http-accept-language><a data-x-internal=http-accept-language href=https://httpwg.org/specs/rfc7231.html#header.accept-language>Accept-Language</a></code>` header.</p>

  


  <h5 id=navigator.online><span class=secno>8.9.1.3</span> <span id=browser-state></span>Browser state<a href=#navigator.online class=self-link></a></h5>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatoronline' data-dfn-type='interface'><c- g>NavigatorOnLine</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>boolean</c-> <a href='#dom-navigator-online' id='navigator.online:dom-navigator-online'><c- g>onLine</c-></a>;
};</code></pre>

  <dl class=domintro><dt><code><var>self</var>.<a href=#dom-navigator id=navigator.online:dom-navigator>navigator</a>.<a href=#dom-navigator-online id=dom-navigator-online-dev>onLine</a></code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine title="Returns the online status of the browser. The property returns a boolean value, with true meaning online and false meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page. For example, the property should return false when users click links soon after they lose internet connection.">Navigator/onLine</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1.5+</span></span><span class="safari yes"><span>Safari</span><span>4+</span></span><span class="chrome yes"><span>Chrome</span><span>2+</span></span><hr><span class="opera yes"><span>Opera</span><span>3+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>4+</span></span><hr><span class="firefox_android yes"><span>Firefox Android</span><span>4+</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android yes"><span>Chrome Android</span><span>18+</span></span><span class="webview_android yes"><span>WebView Android</span><span title="Partial implementation.">🔰 37+</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>10.1+</span></span></div></div><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/onLine title="Returns the online status of the browser. The property returns a boolean value, with true meaning online and false meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page.">WorkerNavigator/onLine</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>4+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span><hr><span class="opera yes"><span>Opera</span><span>10.6+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>10+</span></span><hr><span class="firefox_android yes"><span>Firefox Android</span><span>4+</span></span><span class="safari_ios yes"><span>Safari iOS</span><span>5+</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android yes"><span>WebView Android</span><span title="Partial implementation.">🔰 4.4+</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>11+</span></span></div></div></div><dd>
    <p>Returns false if the user agent is definitely offline (disconnected from the network).
    Returns true if the user agent might be online.</p>

    <p>The events <code id=navigator.online:event-online><a href=indices.html#event-online>online</a></code> and <code id=navigator.online:event-offline><a href=indices.html#event-offline>offline</a></code> are fired when the value of this attribute changes.</p>
   </dl>

  

  <p>The <dfn data-dfn-for=NavigatorOnLine id=dom-navigator-online data-dfn-type=attribute><code>onLine</code></dfn> attribute must return false if the user agent
  will not contact the network when the user follows links or when a script requests a remote page
  (or knows that such an attempt would fail), and must return true otherwise.</p>

  <p>When the value that would be returned by the <code id=navigator.online:dom-navigator-online-2><a href=#dom-navigator-online>navigator.onLine</a></code> attribute of a <code id=navigator.online:window><a href=nav-history-apis.html#window>Window</a></code> or
  <code id=navigator.online:workerglobalscope><a href=workers.html#workerglobalscope>WorkerGlobalScope</a></code> <var>global</var> changes from true to false, the user agent must
  <a id=navigator.online:queue-a-global-task href=webappapis.html#queue-a-global-task>queue a global task</a> on the <a id=navigator.online:networking-task-source href=webappapis.html#networking-task-source>networking task source</a> given
  <var>global</var> to <a href=https://dom.spec.whatwg.org/#concept-event-fire id=navigator.online:concept-event-fire data-x-internal=concept-event-fire>fire an event</a> named <code id=navigator.online:event-offline-2><a href=indices.html#event-offline>offline</a></code> at <var>global</var>.</p>

  <p>On the other hand, when the value that would be returned by the <code id=navigator.online:dom-navigator-online-3><a href=#dom-navigator-online>navigator.onLine</a></code> attribute of a <code id=navigator.online:window-2><a href=nav-history-apis.html#window>Window</a></code> or
  <code id=navigator.online:workerglobalscope-2><a href=workers.html#workerglobalscope>WorkerGlobalScope</a></code> <var>global</var> changes from false to true, the user agent must
  <a id=navigator.online:queue-a-global-task-2 href=webappapis.html#queue-a-global-task>queue a global task</a> on the <a id=navigator.online:networking-task-source-2 href=webappapis.html#networking-task-source>networking task source</a> given
  <var>global</var> to <a href=https://dom.spec.whatwg.org/#concept-event-fire id=navigator.online:concept-event-fire-2 data-x-internal=concept-event-fire>fire an event</a> named <code id=navigator.online:event-online-2><a href=indices.html#event-online>online</a></code> at the <code id=navigator.online:window-3><a href=nav-history-apis.html#window>Window</a></code> or <code id=navigator.online:workerglobalscope-3><a href=workers.html#workerglobalscope>WorkerGlobalScope</a></code>
  object.</p>

  

  <p class=note>This attribute is inherently unreliable. A computer can be connected to a network
  without having Internet access.</p>

  <div class=example>
   <p>In this example, an indicator is updated as the browser goes online and offline.</p>

   <pre><code class='html'><c- cp>&lt;!DOCTYPE HTML&gt;</c->
<c- p>&lt;</c-><c- f>html</c-> <c- e>lang</c-><c- o>=</c-><c- s>&quot;en&quot;</c-><c- p>&gt;</c->
 <c- p>&lt;</c-><c- f>head</c-><c- p>&gt;</c->
  <c- p>&lt;</c-><c- f>title</c-><c- p>&gt;</c->Online status<c- p>&lt;/</c-><c- f>title</c-><c- p>&gt;</c->
  <c- p>&lt;</c-><c- f>script</c-><c- p>&gt;</c->
   <c- a>function</c-> updateIndicator<c- p>()</c-> <c- p>{</c->
     document<c- p>.</c->getElementById<c- p>(</c-><c- t>&apos;indicator&apos;</c-><c- p>).</c->textContent <c- o>=</c-> navigator<c- p>.</c->onLine <c- o>?</c-> <c- t>&apos;online&apos;</c-> <c- o>:</c-> <c- t>&apos;offline&apos;</c-><c- p>;</c->
   <c- p>}</c->
  <c- p>&lt;/</c-><c- f>script</c-><c- p>&gt;</c->
 <c- p>&lt;/</c-><c- f>head</c-><c- p>&gt;</c->
 <c- p>&lt;</c-><c- f>body</c-> <c- e>onload</c-><c- o>=</c-><c- s>&quot;updateIndicator()&quot;</c-> <c- e>ononline</c-><c- o>=</c-><c- s>&quot;updateIndicator()&quot;</c-> <c- e>onoffline</c-><c- o>=</c-><c- s>&quot;updateIndicator()&quot;</c-><c- p>&gt;</c->
  <c- p>&lt;</c-><c- f>p</c-><c- p>&gt;</c->The network is: <c- p>&lt;</c-><c- f>span</c-> <c- e>id</c-><c- o>=</c-><c- s>&quot;indicator&quot;</c-><c- p>&gt;</c->(state unknown)<c- p>&lt;/</c-><c- f>span</c-><c- p>&gt;</c->
 <c- p>&lt;/</c-><c- f>body</c-><c- p>&gt;</c->
<c- p>&lt;/</c-><c- f>html</c-><c- p>&gt;</c-></code></pre>
  </div>


  <h5 id=custom-handlers><span class=secno>8.9.1.4</span> Custom scheme handlers: the <code id=custom-handlers:dom-navigator-registerprotocolhandler><a href=#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a></code> method<a href=#custom-handlers class=self-link></a></h5><div class="mdn-anno wrapped"><button onclick=toggleStatus(this) class=mdn-anno-btn><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler title="The Navigator method registerProtocolHandler() lets websites register their ability to open or handle particular URL schemes (aka protocols).">Navigator/registerProtocolHandler</a><div class=support><span class="firefox yes"><span>Firefox</span><span>2+</span></span><span class="safari no"><span>Safari</span><span>No</span></span><span class="chrome yes"><span>Chrome</span><span>13+</span></span><hr><span class="opera yes"><span>Opera</span><span>11.6+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge no"><span>Edge (Legacy)</span><span>No</span></span><span class="ie no"><span>Internet Explorer</span><span>No</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android no"><span>Chrome Android</span><span>No</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android unknown"><span>Opera Android</span><span>?</span></span></div></div></div>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatorcontentutils' data-dfn-type='interface'><c- g>NavigatorContentUtils</c-></dfn> {
  [<c- g>SecureContext</c->] <c- b>undefined</c-> <a href='#dom-navigator-registerprotocolhandler' id='custom-handlers:dom-navigator-registerprotocolhandler-2'><c- g>registerProtocolHandler</c-></a>(<c- b>DOMString</c-> <c- g>scheme</c->, <c- b>USVString</c-> <c- g>url</c->);
  [<c- g>SecureContext</c->] <c- b>undefined</c-> <a href='#dom-navigator-unregisterprotocolhandler' id='custom-handlers:dom-navigator-unregisterprotocolhandler'><c- g>unregisterProtocolHandler</c-></a>(<c- b>DOMString</c-> <c- g>scheme</c->, <c- b>USVString</c-> <c- g>url</c->);
};</code></pre>

  <dl class=domintro><dt><code><var>window</var>.<a href=#dom-navigator id=custom-handlers:dom-navigator>navigator</a>.<a href=#dom-navigator-registerprotocolhandler id=dom-navigator-registerprotocolhandler-dev>registerProtocolHandler</a>(<var>scheme</var>, <var>url</var>)</code><dd>
    <p>Registers a handler for <var>scheme</var> at <var>url</var>. For example, an online telephone
    messaging service could register itself as a handler of the <code id=custom-handlers:sms-protocol><a data-x-internal=sms-protocol href=https://www.rfc-editor.org/rfc/rfc5724#section-2>sms:</a></code> scheme, so that if the user clicks on such a link, they are given the
    opportunity to use that web site. <a href=references.html#refsSMS>[SMS]</a></p>

    <p>The string "<code>%s</code>" in <var>url</var> is used as a placeholder for where
    to put the URL of the content to be handled.</p>

    <p>Throws a <a id=custom-handlers:securityerror href=https://webidl.spec.whatwg.org/#securityerror data-x-internal=securityerror>"<code>SecurityError</code>"</a> <code id=custom-handlers:domexception><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code> if the user
    agent blocks the registration (this might happen if trying to register as a handler for "<code>http</code>", for instance).</p>

    <p>Throws a <a id=custom-handlers:syntaxerror href=https://webidl.spec.whatwg.org/#syntaxerror data-x-internal=syntaxerror>"<code>SyntaxError</code>"</a> <code id=custom-handlers:domexception-2><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code> if the "<code>%s</code>" string is missing in <var>url</var>.</p>
   <dt><code><var>window</var>.<a href=#dom-navigator id=custom-handlers:dom-navigator-2>navigator</a>.<a href=#dom-navigator-unregisterprotocolhandler id=dom-navigator-unregisterprotocolhandler-dev>unregisterProtocolHandler</a>(<var>scheme</var>, <var>url</var>)</code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in one engine only." class=less-than-two-engines-flag>⚠</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/unregisterProtocolHandler title="The Navigator method unregisterProtocolHandler() removes a protocol handler for a given URL scheme.">Navigator/unregisterProtocolHandler</a><p class=less-than-two-engines-text>Support in one engine only.<div class=support><span class="firefox no"><span>Firefox</span><span>No</span></span><span class="safari no"><span>Safari</span><span>No</span></span><span class="chrome yes"><span>Chrome</span><span>38+</span></span><hr><span class="opera yes"><span>Opera</span><span>25+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge unknown"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>Internet Explorer</span><span>No</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android no"><span>Chrome Android</span><span>No</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android unknown"><span>Opera Android</span><span>?</span></span></div></div></div><dd>
    <p>Unregisters the handler given by the arguments.</p>

    <p>Throws a <a id=custom-handlers:securityerror-2 href=https://webidl.spec.whatwg.org/#securityerror data-x-internal=securityerror>"<code>SecurityError</code>"</a> <code id=custom-handlers:domexception-3><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code> if the user
    agent blocks the deregistration (this might happen if with invalid schemes, for instance).</p>

    <p>Throws a <a id=custom-handlers:syntaxerror-2 href=https://webidl.spec.whatwg.org/#syntaxerror data-x-internal=syntaxerror>"<code>SyntaxError</code>"</a> <code id=custom-handlers:domexception-4><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code> if the "<code>%s</code>" string is missing in <var>url</var>.</p>
   </dl>


  

  <p>The <dfn data-dfn-for=NavigatorContentUtils id=dom-navigator-registerprotocolhandler data-dfn-type=method><code>registerProtocolHandler(<var>scheme</var>,
  <var>url</var>)</code></dfn> method steps are:</p>

  <ol><li><p>Let (<var>normalizedScheme</var>, <var>normalizedURLString</var>) be the result of running
   <a href=#normalize-protocol-handler-parameters id=custom-handlers:normalize-protocol-handler-parameters>normalize protocol handler parameters</a> with <var>scheme</var>, <var>url</var>, and
   <a id=custom-handlers:this href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=custom-handlers:relevant-settings-object href=webappapis.html#relevant-settings-object>relevant settings object</a>.<li>
    <p><a id=custom-handlers:in-parallel href=infrastructure.html#in-parallel>In parallel</a>: <dfn id=protocol-handler-registration data-export="">register a
    protocol handler</dfn> for <var>normalizedScheme</var> and <var>normalizedURLString</var>. User
    agents may, within the constraints described, do whatever they like. A user agent could, for
    instance, prompt the user and offer the user the opportunity to add the site to a shortlist of
    handlers, or make the handlers their default, or cancel the request. User agents could also
    silently collect the information, providing it only when relevant to the user.</p>

    <p>User agents should keep track of which sites have registered handlers (even if the user has
    declined such registrations) so that the user is not repeatedly prompted with the same
    request.</p>

    <p>If the <a href=#registerprotocolhandler()-automation-mode id=custom-handlers:registerprotocolhandler()-automation-mode><code>registerProtocolHandler()</code> automation
    mode</a> of <a id=custom-handlers:this-2 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=custom-handlers:concept-relevant-global href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=nav-history-apis.html#concept-document-window id=custom-handlers:concept-document-window>associated <code>Document</code></a> is not "<dfn id=rph-automation-mode-none><code>none</code></dfn>", the user agent should first verify that it
    is in an automation context (see <a id="custom-handlers:webdriver's-security-considerations" href=https://w3c.github.io/webdriver/#security data-x-internal="webdriver's-security-considerations">WebDriver's security considerations</a>). The user
    agent should then bypass the above communication of information and gathering of user consent,
    and instead do the following based on the value of the <a href=#registerprotocolhandler()-automation-mode id=custom-handlers:registerprotocolhandler()-automation-mode-2><code>registerProtocolHandler()</code> automation
    mode</a>:</p>

    <dl><dt>"<dfn id=rph-automation-mode-auto-accept><code>autoAccept</code></dfn>"<dd><p>Act as if the user has seen the registration details and accepted the request.<dt>"<dfn id=rph-automation-mode-auto-reject><code>autoReject</code></dfn>"<dd><p>Act as if the user has seen the registration details and rejected the request.</dl>

    <p>When the <dfn id=protocol-handler-invocation data-lt="invoke a protocol
    handler" data-export="">user agent uses this handler</dfn> for a <a id=custom-handlers:url href=https://url.spec.whatwg.org/#concept-url data-x-internal=url>URL</a> <var>inputURL</var>:</p>

    <ol><li><p><a id=custom-handlers:assert href=https://infra.spec.whatwg.org/#assert data-x-internal=assert>Assert</a>: <var>inputURL</var>'s <a href=https://url.spec.whatwg.org/#concept-url-scheme id=custom-handlers:concept-url-scheme data-x-internal=concept-url-scheme>scheme</a> is <var>normalizedScheme</var>.<li><p><a href=https://url.spec.whatwg.org/#set-the-username id=custom-handlers:set-the-username data-x-internal=set-the-username>Set the username</a> given <var>inputURL</var> and
     the empty string.<li><p><a href=https://url.spec.whatwg.org/#set-the-password id=custom-handlers:set-the-password data-x-internal=set-the-password>Set the password</a> given <var>inputURL</var> and
     the empty string.<li><p>Let <var>inputURLString</var> be the <a href=https://url.spec.whatwg.org/#concept-url-serializer id=custom-handlers:concept-url-serializer data-x-internal=concept-url-serializer>serialization</a> of <var>inputURL</var>.<li><p>Let <var>encodedURL</var> be the result of running <a id=custom-handlers:utf-8-percent-encode href=https://url.spec.whatwg.org/#string-utf-8-percent-encode data-x-internal=utf-8-percent-encode>UTF-8 percent-encode</a> on
     <var>inputURLString</var> using the <a id=custom-handlers:component-percent-encode-set href=https://url.spec.whatwg.org/#component-percent-encode-set data-x-internal=component-percent-encode-set>component percent-encode set</a>.<li><p>Let <var>handlerURLString</var> be <var>normalizedURLString</var>.<li><p>Replace the first instance of "<code>%s</code>" in <var>handlerURLString</var>
     with <var>encodedURL</var>.<li><p>Let <var>resultURL</var> be the result of <a href=https://url.spec.whatwg.org/#concept-url-parser id=custom-handlers:url-parser data-x-internal=url-parser>parsing</a>
     <var>handlerURLString</var>.<li><p><a id=custom-handlers:navigate href=browsing-the-web.html#navigate>Navigate</a> an appropriate <a id=custom-handlers:navigable href=document-sequences.html#navigable>navigable</a> to
     <var>resultURL</var>.</ol>

    <div class=example>
     <p>If the user had visited a site at <code>https://example.com/</code> that made the
     following call:</p>

     <pre><code class='js'>navigator<c- p>.</c->registerProtocolHandler<c- p>(</c-><c- t>&apos;web+soup&apos;</c-><c- p>,</c-> <c- t>&apos;soup?url=%s&apos;</c-><c- p>)</c-></code></pre>

     <p>...and then, much later, while visiting <code>https://www.example.net/</code>,
     clicked on a link such as:</p>

     <pre><code class='html'><c- p>&lt;</c-><c- f>a</c-> <c- e>href</c-><c- o>=</c-><c- s>&quot;web+soup:chicken-kïwi&quot;</c-><c- p>&gt;</c->Download our Chicken Kïwi soup!<c- p>&lt;/</c-><c- f>a</c-><c- p>&gt;</c-></code></pre>

     <p>...then the UA might navigate to the following URL:</p>

     <pre>https://example.com/soup?url=web+soup:chicken-k%C3%AFwi</pre>

     <p>This site could then do whatever it is that it does with soup (synthesize it and ship it to
     the user, or whatever).</p>
    </div>

    <p>This does not define when the handler is used. To some extent, the <a href=browsing-the-web.html#navigate id=custom-handlers:navigate-2>processing model for navigating across documents</a> defines some cases
    where it is relevant, but in general user agents may use this information wherever they would
    otherwise consider handing schemes to native plugins or helper applications.</p>
   </ol>

  <p>The <dfn data-dfn-for=NavigatorContentUtils id=dom-navigator-unregisterprotocolhandler data-dfn-type=method><code>unregisterProtocolHandler(<var>scheme</var>,
  <var>url</var>)</code></dfn> method steps are:

  <ol><li><p>Let (<var>normalizedScheme</var>, <var>normalizedURLString</var>) be the result of running
   <a href=#normalize-protocol-handler-parameters id=custom-handlers:normalize-protocol-handler-parameters-2>normalize protocol handler parameters</a> with <var>scheme</var>, <var>url</var>, and
   <a id=custom-handlers:this-3 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=custom-handlers:relevant-settings-object-2 href=webappapis.html#relevant-settings-object>relevant settings object</a>.<li><p><a id=custom-handlers:in-parallel-2 href=infrastructure.html#in-parallel>In parallel</a>: unregister the handler described by <var>normalizedScheme</var>
   and <var>normalizedURLString</var>.</ol>

  <hr>

  <p>To <dfn id=normalize-protocol-handler-parameters data-export="">normalize protocol handler parameters</dfn>, given a string <var>scheme</var>, a
  string <var>url</var>, and an <a id=custom-handlers:environment-settings-object href=webappapis.html#environment-settings-object>environment settings object</a> <var>environment</var>, run
  these steps:</p>

  <ol><li><p>Set <var>scheme</var> to <var>scheme</var>, <a id=custom-handlers:converted-to-ascii-lowercase href=https://infra.spec.whatwg.org/#ascii-lowercase data-x-internal=converted-to-ascii-lowercase>converted to ASCII
   lowercase</a>.<li>
    <p>If <var>scheme</var> is neither a <a href=#safelisted-scheme id=custom-handlers:safelisted-scheme>safelisted scheme</a> nor a string starting with
    "<code>web+</code>" followed by one or more <a href=https://infra.spec.whatwg.org/#ascii-lower-alpha id=custom-handlers:lowercase-ascii-letters data-x-internal=lowercase-ascii-letters>ASCII
    lower alphas</a>, then throw a <a id=custom-handlers:securityerror-3 href=https://webidl.spec.whatwg.org/#securityerror data-x-internal=securityerror>"<code>SecurityError</code>"</a>
    <code id=custom-handlers:domexception-5><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code>.</p>

    <p class=note>This means that including a colon in <var>scheme</var> (as in "<code>mailto:</code>") will throw.</p>

    <p>The following schemes are the <dfn id=safelisted-scheme data-export="">safelisted
    schemes</dfn>:</p>

    <ul class=brief><li><code>bitcoin</code><li><code>ftp</code><li><code>ftps</code><li><code>geo</code><li><code>im</code><li><code>irc</code><li><code>ircs</code><li><code>magnet</code><li><code>mailto</code><li><code>matrix</code><li><code>mms</code><li><code>news</code><li><code>nntp</code><li><code>openpgp4fpr</code><li><code>sftp</code><li><code>sip</code><li><code>sms</code><li><code>smsto</code><li><code>ssh</code><li><code>tel</code><li><code>urn</code><li><code>webcal</code><li><code>wtai</code><li><code>xmpp</code></ul>

    <p class=note>This list can be changed. If there are schemes that ought to be added, please
    send feedback.</p>
   <li><p>If <var>url</var> does not contain "<code>%s</code>", then throw a
   <a id=custom-handlers:syntaxerror-3 href=https://webidl.spec.whatwg.org/#syntaxerror data-x-internal=syntaxerror>"<code>SyntaxError</code>"</a> <code id=custom-handlers:domexception-6><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code>.<li><p>Let <var>urlRecord</var> be the result of <a id=custom-handlers:encoding-parsing-a-url href=urls-and-fetching.html#encoding-parsing-a-url>encoding-parsing a URL</a> given
   <var>url</var>, relative to <var>environment</var>.<li>
    <p>If <var>urlRecord</var> is failure, then throw a <a id=custom-handlers:syntaxerror-4 href=https://webidl.spec.whatwg.org/#syntaxerror data-x-internal=syntaxerror>"<code>SyntaxError</code>"</a>
    <code id=custom-handlers:domexception-7><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code>.</p>

    <p class=note>This is forcibly the case if the <code>%s</code> placeholder is in the
    host or port of the URL.</p>
   <li><p>If <var>urlRecord</var>'s <a href=https://url.spec.whatwg.org/#concept-url-scheme id=custom-handlers:concept-url-scheme-2 data-x-internal=concept-url-scheme>scheme</a> is not an
   <a id=custom-handlers:http(s)-scheme href=https://fetch.spec.whatwg.org/#http-scheme data-x-internal=http(s)-scheme>HTTP(S) scheme</a> or <var>urlRecord</var>'s <a href=https://url.spec.whatwg.org/#concept-url-origin id=custom-handlers:concept-url-origin data-x-internal=concept-url-origin>origin</a> is not <a id=custom-handlers:same-origin href=browsers.html#same-origin>same origin</a> with
   <var>environment</var>'s <a href=webappapis.html#concept-settings-object-origin id=custom-handlers:concept-settings-object-origin>origin</a>, then throw
   a <a id=custom-handlers:securityerror-4 href=https://webidl.spec.whatwg.org/#securityerror data-x-internal=securityerror>"<code>SecurityError</code>"</a> <code id=custom-handlers:domexception-8><a data-x-internal=domexception href=https://webidl.spec.whatwg.org/#dfn-DOMException>DOMException</a></code>.<li>
    <p><a id=custom-handlers:assert-2 href=https://infra.spec.whatwg.org/#assert data-x-internal=assert>Assert</a>: the result of <a id=custom-handlers:is-url-potentially-trustworthy href=https://w3c.github.io/webappsec-secure-contexts/#potentially-trustworthy-url data-x-internal=is-url-potentially-trustworthy>Is url potentially trustworthy?</a> given
    <var>urlRecord</var> is "<code>Potentially Trustworthy</code>".</p>

    <p class=note>Because <a href=#normalize-protocol-handler-parameters id=custom-handlers:normalize-protocol-handler-parameters-3>normalize protocol handler parameters</a> is run within a
    <a id=custom-handlers:secure-context href=webappapis.html#secure-context>secure context</a>, this is implied by the <a id=custom-handlers:same-origin-2 href=browsers.html#same-origin>same origin</a> condition.</p>
   <li>
    <p>Return (<var>scheme</var>, <var>urlRecord</var>).</p>

    <p class=note>The <a href=https://url.spec.whatwg.org/#concept-url-serializer id=custom-handlers:concept-url-serializer-2 data-x-internal=concept-url-serializer>serialization</a> of
    <var>urlRecord</var> will by definition not be a <a id=custom-handlers:valid-url-string href=https://url.spec.whatwg.org/#valid-url-string data-x-internal=valid-url-string>valid URL string</a> as it includes
    the string "<code>%s</code>" which is not a valid component in a URL.</p>
   </ol>



  <h6 id=security-and-privacy><span class=secno>8.9.1.4.1</span> Security and privacy<a href=#security-and-privacy class=self-link></a></h6>

  <p>Custom scheme handlers can introduce a number of concerns, in particular privacy concerns.</p>

  <p><strong>Hijacking all web usage.</strong> User agents should not allow schemes that are key to
  its normal operation, such as an <a id=security-and-privacy:http(s)-scheme href=https://fetch.spec.whatwg.org/#http-scheme data-x-internal=http(s)-scheme>HTTP(S) scheme</a>, to be rerouted through third-party
  sites. This would allow a user's activities to be trivially tracked, and would allow user
  information, even in secure connections, to be collected.</p>

  <p><strong>Hijacking defaults.</strong> User agents are strongly urged to not automatically change
  any defaults, as this could lead the user to send data to remote hosts that the user is not
  expecting. New handlers registering themselves should never automatically cause those sites to be
  used.</p>

  <p><strong>Registration spamming.</strong> User agents should consider the possibility that a site
  will attempt to register a large number of handlers, possibly from multiple domains (e.g., by
  redirecting through a series of pages each on a different domain, and each registering a handler
  for <code>web+spam:</code> — analogous practices abusing other web browser
  features have been used by pornography web sites for many years). User agents should gracefully
  handle such hostile attempts, protecting the user.</p>

  <p><strong>Hostile handler metadata.</strong> User agents should protect against typical attacks
  against strings embedded in their interface, for example ensuring that markup or escape characters
  in such strings are not executed, that null bytes are properly handled, that over-long strings do
  not cause crashes or buffer overruns, and so forth.</p>

  <p><strong>Leaking private data.</strong> Web page authors may reference a custom scheme
  handler using URL data considered private. They might do so with the expectation that the user's
  choice of handler points to a page inside the organization, ensuring that sensitive data will not
  be exposed to third parties. However, a user may have registered a handler pointing to an
  external site, resulting in a data leak to that third party. Implementers might wish to consider
  allowing administrators to disable custom handlers on certain subdomains, content types, or
  schemes.</p>

  <p><strong>Interface interference.</strong> User agents should be prepared to handle intentionally
  long arguments to the methods. For example, if the user interface exposed consists of an "accept"
  button and a "deny" button, with the "accept" binding containing the name of the handler, it's
  important that a long name not cause the "deny" button to be pushed off the screen.</p>

  <h6 id=user-agent-automation><span class=secno>8.9.1.4.2</span> <dfn id=rph-user-agent-automation>User agent automation</dfn><a href=#user-agent-automation class=self-link></a></h6>

  <p>Each <code id=user-agent-automation:document><a href=dom.html#document>Document</a></code> has a <dfn id=registerprotocolhandler()-automation-mode><code>registerProtocolHandler()</code> automation
  mode</dfn>. It defaults to "<code id=user-agent-automation:rph-automation-mode-none><a href=#rph-automation-mode-none>none</a></code>", but it also can
  be either "<code id=user-agent-automation:rph-automation-mode-auto-accept><a href=#rph-automation-mode-auto-accept>autoAccept</a></code>" or "<code id=user-agent-automation:rph-automation-mode-auto-reject><a href=#rph-automation-mode-auto-reject>autoReject</a></code>".</p>

  <p>For the purposes of user agent automation and website testing, this standard defines <dfn id=set-rph-registration-mode>Set RPH Registration Mode</dfn> WebDriver <a id=user-agent-automation:extension-command href=https://w3c.github.io/webdriver/#dfn-extension-commands data-x-internal=extension-command>extension
  command</a>. It instructs the user agent to place a <code id=user-agent-automation:document-2><a href=dom.html#document>Document</a></code> into a mode where it
  will automatically simulate a user either accepting or rejecting and registration confirmation
  prompt dialog.</p>

  <table class=data><thead><tr><th>HTTP Method
     <th>URI Template
   <tbody><tr><td>`<code>POST</code>`
     <td><code>/session/{session id}/custom-handlers/set-mode</code>
  </table>

  <p>The <a id=user-agent-automation:remote-end-steps href=https://w3c.github.io/webdriver/#dfn-remote-end-steps data-x-internal=remote-end-steps>remote end steps</a> are:</p>

  <ol><li><p>If <var>parameters</var> is not a JSON Object, return a <a id=user-agent-automation:webdriver-error href=https://w3c.github.io/webdriver/#dfn-errors data-x-internal=webdriver-error>WebDriver error</a> with
   <a id=user-agent-automation:webdriver-error-code href=https://w3c.github.io/webdriver/#dfn-error-code data-x-internal=webdriver-error-code>WebDriver error code</a> <a id=user-agent-automation:invalid-argument href=https://w3c.github.io/webdriver/#dfn-invalid-argument data-x-internal=invalid-argument>invalid argument</a>.<li><p>Let <var>mode</var> be the result of <a id=user-agent-automation:getting-a-property href=https://w3c.github.io/webdriver/#dfn-getting-properties data-x-internal=getting-a-property>getting a property</a> named "<code>mode</code>" from <var>parameters</var>.<li><p>If <var>mode</var> is not "<code id=user-agent-automation:rph-automation-mode-auto-accept-2><a href=#rph-automation-mode-auto-accept>autoAccept</a></code>", "<code id=user-agent-automation:rph-automation-mode-auto-reject-2><a href=#rph-automation-mode-auto-reject>autoReject</a></code>", or "<code id=user-agent-automation:rph-automation-mode-none-2><a href=#rph-automation-mode-none>none</a></code>", return a <a id=user-agent-automation:webdriver-error-2 href=https://w3c.github.io/webdriver/#dfn-errors data-x-internal=webdriver-error>WebDriver error</a> with
   <a id=user-agent-automation:webdriver-error-code-2 href=https://w3c.github.io/webdriver/#dfn-error-code data-x-internal=webdriver-error-code>WebDriver error code</a> <a id=user-agent-automation:invalid-argument-2 href=https://w3c.github.io/webdriver/#dfn-invalid-argument data-x-internal=invalid-argument>invalid argument</a>.<li><p>Let <var>document</var> be the <a href=https://w3c.github.io/webdriver/#dfn-current-browsing-context id=user-agent-automation:webdriver-current-browsing-context data-x-internal=webdriver-current-browsing-context>current
   browsing context</a>'s <a id=user-agent-automation:active-document href=document-sequences.html#active-document>active document</a>.<li><p>Set <var>document</var>'s <a href=#registerprotocolhandler()-automation-mode id=user-agent-automation:registerprotocolhandler()-automation-mode><code>registerProtocolHandler()</code> automation
   mode</a> to <var>mode</var>.<li><p>Return <a href=https://w3c.github.io/webdriver/#dfn-success id=user-agent-automation:success-value data-x-internal=success-value>success</a> with data null.</ol>

  

  <h5 id=cookies><span class=secno>8.9.1.5</span> Cookies<a href=#cookies class=self-link></a></h5>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatorcookies' data-dfn-type='interface'><c- g>NavigatorCookies</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>boolean</c-> <a href='#dom-navigator-cookieenabled' id='cookies:dom-navigator-cookieenabled'><c- g>cookieEnabled</c-></a>;
};</code></pre>

  <dl class=domintro><dt><code><var>window</var>.<a href=#dom-navigator id=cookies:dom-navigator>navigator</a>.<a href=#dom-navigator-cookieenabled id=dom-navigator-cookieenabled-dev>cookieEnabled</a></code><div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/cookieEnabled title="navigator.cookieEnabled returns a Boolean value that indicates whether cookies are enabled or not.">Navigator/cookieEnabled</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span><hr><span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span><hr><span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>Internet Explorer</span><span>4+</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Android</span><span>12.1+</span></span></div></div></div><dd><p>Returns false if setting a cookie will be ignored, and true otherwise.</dl>

  

   <p>The <dfn data-dfn-for=NavigatorCookies id=dom-navigator-cookieenabled data-dfn-type=attribute><code>cookieEnabled</code></dfn> attribute must return true if the
   user agent attempts to handle cookies according to <cite>HTTP State Management Mechanism</cite>,
   and false if it ignores cookie change requests. <a href=references.html#refsCOOKIES>[COOKIES]</a></p>

  

  <h5 id=pdf-viewing-support><span class=secno>8.9.1.6</span> PDF viewing support<a href=#pdf-viewing-support class=self-link></a></h5>

  <dl class=domintro><dt><code><var>window</var>.<a href=#dom-navigator id=pdf-viewing-support:dom-navigator>navigator</a>.<a href=#dom-navigator-pdfviewerenabled id=dom-navigator-pdfviewerenabled-dev>pdfViewerEnabled</a></code><dd><p>Returns true if the user agent supports inline viewing of PDF files when <a href=browsing-the-web.html#navigate id=pdf-viewing-support:navigate>navigating</a> to them, or false otherwise. In the latter case, PDF files
   will be handled by <a href=browsing-the-web.html#hand-off-to-external-software id=pdf-viewing-support:hand-off-to-external-software>external
   software</a>.</dl>

  <pre><code class='idl'><c- b>interface</c-> <c- b>mixin</c-> <dfn id='navigatorplugins' data-dfn-type='interface'><c- g>NavigatorPlugins</c-></dfn> {
  [<c- g>SameObject</c->] <c- b>readonly</c-> <c- b>attribute</c-> <a href='#pluginarray' id='pdf-viewing-support:pluginarray'><c- n>PluginArray</c-></a> <a href='#dom-navigator-plugins' id='pdf-viewing-support:dom-navigator-plugins'><c- g>plugins</c-></a>;
  [<c- g>SameObject</c->] <c- b>readonly</c-> <c- b>attribute</c-> <a href='#mimetypearray' id='pdf-viewing-support:mimetypearray'><c- n>MimeTypeArray</c-></a> <a href='#dom-navigator-mimetypes' id='pdf-viewing-support:dom-navigator-mimetypes'><c- g>mimeTypes</c-></a>;
  <c- b>boolean</c-> <a href='#dom-navigator-javaenabled' id='pdf-viewing-support:dom-navigator-javaenabled'><c- g>javaEnabled</c-></a>();
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>boolean</c-> <a href='#dom-navigator-pdfviewerenabled' id='pdf-viewing-support:dom-navigator-pdfviewerenabled'><c- g>pdfViewerEnabled</c-></a>;
};

[<c- g>Exposed</c->=<c- n>Window</c->,
 <a id='pdf-viewing-support:legacyunenumerablenamedproperties' href='https://webidl.spec.whatwg.org/#LegacyUnenumerableNamedProperties' data-x-internal='legacyunenumerablenamedproperties'><c- g>LegacyUnenumerableNamedProperties</c-></a>]
<c- b>interface</c-> <dfn id='pluginarray' data-dfn-type='interface'><c- g>PluginArray</c-></dfn> {
  <c- b>undefined</c-> <a href='#dom-pluginarray-refresh' id='pdf-viewing-support:dom-pluginarray-refresh'><c- g>refresh</c-></a>();
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>unsigned</c-> <c- b>long</c-> <a href='#dom-pluginarray-length' id='pdf-viewing-support:dom-pluginarray-length'><c- g>length</c-></a>;
  <c- b>getter</c-> <a id='pdf-viewing-support:plugin' href='infrastructure.html#plugin'><c- n>Plugin</c-></a>? <a href='#dom-pluginarray-item' id='pdf-viewing-support:dom-pluginarray-item'><c- g>item</c-></a>(<c- b>unsigned</c-> <c- b>long</c-> <c- g>index</c->);
  <c- b>getter</c-> <a id='pdf-viewing-support:plugin-2' href='infrastructure.html#plugin'><c- n>Plugin</c-></a>? <a href='#dom-pluginarray-nameditem' id='pdf-viewing-support:dom-pluginarray-nameditem'><c- g>namedItem</c-></a>(<c- b>DOMString</c-> <c- g>name</c->);
};

[<c- g>Exposed</c->=<c- n>Window</c->,
 <a id='pdf-viewing-support:legacyunenumerablenamedproperties-2' href='https://webidl.spec.whatwg.org/#LegacyUnenumerableNamedProperties' data-x-internal='legacyunenumerablenamedproperties'><c- g>LegacyUnenumerableNamedProperties</c-></a>]
<c- b>interface</c-> <dfn id='mimetypearray' data-dfn-type='interface'><c- g>MimeTypeArray</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>unsigned</c-> <c- b>long</c-> <a href='#dom-mimetypearray-length' id='pdf-viewing-support:dom-mimetypearray-length'><c- g>length</c-></a>;
  <c- b>getter</c-> <a href='#mimetype' id='pdf-viewing-support:mimetype'><c- n>MimeType</c-></a>? <a href='#dom-mimetypearray-item' id='pdf-viewing-support:dom-mimetypearray-item'><c- g>item</c-></a>(<c- b>unsigned</c-> <c- b>long</c-> <c- g>index</c->);
  <c- b>getter</c-> <a href='#mimetype' id='pdf-viewing-support:mimetype-2'><c- n>MimeType</c-></a>? <a href='#dom-mimetypearray-nameditem' id='pdf-viewing-support:dom-mimetypearray-nameditem'><c- g>namedItem</c-></a>(<c- b>DOMString</c-> <c- g>name</c->);
};

[<c- g>Exposed</c->=<c- n>Window</c->,
 <a id='pdf-viewing-support:legacyunenumerablenamedproperties-3' href='https://webidl.spec.whatwg.org/#LegacyUnenumerableNamedProperties' data-x-internal='legacyunenumerablenamedproperties'><c- g>LegacyUnenumerableNamedProperties</c-></a>]
<c- b>interface</c-> <dfn id='dom-plugin' data-dfn-type='interface'><c- g>Plugin</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-plugin-name' id='pdf-viewing-support:dom-plugin-name'><c- g>name</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-plugin-description' id='pdf-viewing-support:dom-plugin-description'><c- g>description</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-plugin-filename' id='pdf-viewing-support:dom-plugin-filename'><c- g>filename</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>unsigned</c-> <c- b>long</c-> <a href='#dom-plugin-length' id='pdf-viewing-support:dom-plugin-length'><c- g>length</c-></a>;
  <c- b>getter</c-> <a href='#mimetype' id='pdf-viewing-support:mimetype-3'><c- n>MimeType</c-></a>? <a href='#dom-plugin-item' id='pdf-viewing-support:dom-plugin-item'><c- g>item</c-></a>(<c- b>unsigned</c-> <c- b>long</c-> <c- g>index</c->);
  <c- b>getter</c-> <a href='#mimetype' id='pdf-viewing-support:mimetype-4'><c- n>MimeType</c-></a>? <a href='#dom-plugin-nameditem' id='pdf-viewing-support:dom-plugin-nameditem'><c- g>namedItem</c-></a>(<c- b>DOMString</c-> <c- g>name</c->);
};

[<c- g>Exposed</c->=<c- n>Window</c->]
<c- b>interface</c-> <dfn id='mimetype' data-dfn-type='interface'><c- g>MimeType</c-></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-mimetype-type' id='pdf-viewing-support:dom-mimetype-type'><c- g>type</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-mimetype-description' id='pdf-viewing-support:dom-mimetype-description'><c- g>description</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>DOMString</c-> <a href='#dom-mimetype-suffixes' id='pdf-viewing-support:dom-mimetype-suffixes'><c- g>suffixes</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a id='pdf-viewing-support:plugin-3' href='infrastructure.html#plugin'><c- n>Plugin</c-></a> <a href='#dom-mimetype-enabledplugin' id='pdf-viewing-support:dom-mimetype-enabledplugin'><c- g>enabledPlugin</c-></a>;
};</code></pre>

  

  <p>Although these days detecting PDF viewer support can be done via <code id=pdf-viewing-support:dom-navigator-pdfviewerenabled-2><a href=#dom-navigator-pdfviewerenabled>navigator.pdfViewerEnabled</a></code>, for historical reasons,
  there are a number of complex and intertwined interfaces that provide the same capability, which
  legacy code relies on. This section specifies both the simple modern variant and the complicated
  historical one.</p>

  <p id=fingerprint-pdfViewerEnabled>
  <a id=pdf-viewing-support:tracking-vector title="There is a tracking vector here." href=https://infra.spec.whatwg.org/#tracking-vector class=tracking-vector data-x-internal=tracking-vector><img width=46 alt="(This is a tracking vector.)" crossorigin="" class=darkmode-aware src=https://resources.whatwg.org/tracking-vector.svg height=64></a>
  Each user agent has a <dfn id=pdf-viewer-supported>PDF viewer supported</dfn> boolean, whose value is
  <a id=pdf-viewing-support:implementation-defined href=https://infra.spec.whatwg.org/#implementation-defined data-x-internal=implementation-defined>implementation-defined</a> (and might vary according to user preferences).</p>

  <p class=note>This value also impacts the <a href=browsing-the-web.html#navigate id=pdf-viewing-support:navigate-2>navigation</a> processing
  model.</p>

  <hr>

  <p>Each <code id=pdf-viewing-support:window><a href=nav-history-apis.html#window>Window</a></code> object has a <dfn id=pdf-viewer-plugin-objects>PDF viewer plugin objects</dfn> list. If the user
  agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported>PDF viewer supported</a> is false, then it is the empty list. Otherwise, it is a
  list containing five <code id=pdf-viewing-support:dom-plugin><a href=#dom-plugin>Plugin</a></code> objects, whose <a href=#concept-plugin-name id=pdf-viewing-support:concept-plugin-name>names</a> are, respectively:</p>

  <ol start=0 class=brief><li>"<code>PDF Viewer</code>"<li>"<code>Chrome PDF Viewer</code>"<li>"<code>Chromium PDF Viewer</code>"<li>"<code>Microsoft Edge PDF Viewer</code>"<li>"<code>WebKit built-in PDF</code>"</ol>

  <p>The values of the above list form the <dfn id=pdf-viewer-plugin-names>PDF viewer plugin names</dfn> list.</p>

  <p class=note>These names were chosen based on evidence of what websites historically search
  for, and thus what is necessary for user agents to expose in order to maintain compatibility with
  existing content. They are ordered alphabetically. The "<code>PDF Viewer</code>" name
  was then inserted in the 0th position so that the <code id=pdf-viewing-support:dom-mimetype-enabledplugin-2><a href=#dom-mimetype-enabledplugin>enabledPlugin</a></code> getter could point to a generic plugin
  name.</p>

  <p>Each <code id=pdf-viewing-support:window-2><a href=nav-history-apis.html#window>Window</a></code> object has a <dfn id=pdf-viewer-mime-type-objects>PDF viewer mime type objects</dfn> list. If the user
  agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported-2>PDF viewer supported</a> is false, then it is the empty list. Otherwise, it is a
  list containing two <code id=pdf-viewing-support:mimetype-5><a href=#mimetype>MimeType</a></code> objects, whose <a href=#concept-mimetype-type id=pdf-viewing-support:concept-mimetype-type>types</a> are, respectively:</p>

  <ol start=0 class=brief><li>"<code>application/pdf</code>"<li>"<code>text/pdf</code>"</ol>

  <p>The values of the above list form the <dfn id=pdf-viewer-mime-types>PDF viewer mime types</dfn> list.</p>

  <hr>

  <p>Each <code id=pdf-viewing-support:navigatorplugins><a href=#navigatorplugins>NavigatorPlugins</a></code> object has a <dfn id=plugins-array>plugins array</dfn>, which is a new
  <code id=pdf-viewing-support:pluginarray-2><a href=#pluginarray>PluginArray</a></code>, and a <dfn id=mime-types-array>mime types array</dfn>, which is a new
  <code id=pdf-viewing-support:mimetypearray-2><a href=#mimetypearray>MimeTypeArray</a></code>.</p>

  <p>The <code id=pdf-viewing-support:navigatorplugins-2><a href=#navigatorplugins>NavigatorPlugins</a></code> mixin's <dfn data-dfn-for=NavigatorPlugins id=dom-navigator-plugins data-dfn-type=attribute><code>plugins</code></dfn> getter steps are to return <a id=pdf-viewing-support:this href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s
  <a href=#plugins-array id=pdf-viewing-support:plugins-array>plugins array</a>.</p>

  <p>The <code id=pdf-viewing-support:navigatorplugins-3><a href=#navigatorplugins>NavigatorPlugins</a></code> mixin's <dfn data-dfn-for=NavigatorPlugins id=dom-navigator-mimetypes data-dfn-type=attribute><code>mimeTypes</code></dfn> getter steps are to return
  <a id=pdf-viewing-support:this-2 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a href=#mime-types-array id=pdf-viewing-support:mime-types-array>mime types array</a>.</p>

  <p>The <code id=pdf-viewing-support:navigatorplugins-4><a href=#navigatorplugins>NavigatorPlugins</a></code> mixin's <dfn data-dfn-for=NavigatorPlugins id=dom-navigator-javaenabled data-dfn-type=method><code>javaEnabled()</code></dfn> method steps are to return false.</p>

  <div class="mdn-anno wrapped before"><button onclick=toggleStatus(this) class=mdn-anno-btn><b title="Support in all current engines." class=all-engines-flag>✔</b><span>MDN</span></button><div class=feature><p><a href=https://developer.mozilla.org/en-US/docs/Web/API/Navigator/pdfViewerEnabled title="The pdfViewerEnabled property of the Navigator interface indicates whether the browser supports inline display of PDF files when navigating to them.">Navigator/pdfViewerEnabled</a><p class=all-engines-text>Support in all current engines.<div class=support><span class="firefox yes"><span>Firefox</span><span>99+</span></span><span class="safari yes"><span>Safari</span><span>16.4+</span></span><span class="chrome yes"><span>Chrome</span><span>94+</span></span><hr><span class="opera unknown"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>94+</span></span><hr><span class="edge unknown"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>Internet Explorer</span><span>No</span></span><hr><span class="firefox_android unknown"><span>Firefox Android</span><span>?</span></span><span class="safari_ios unknown"><span>Safari iOS</span><span>?</span></span><span class="chrome_android unknown"><span>Chrome Android</span><span>?</span></span><span class="webview_android unknown"><span>WebView Android</span><span>?</span></span><span class="samsunginternet_android unknown"><span>Samsung Internet</span><span>?</span></span><span class="opera_android unknown"><span>Opera Android</span><span>?</span></span></div></div></div><p>The <code id=pdf-viewing-support:navigatorplugins-5><a href=#navigatorplugins>NavigatorPlugins</a></code> mixin's <dfn data-dfn-for=NavigatorPlugins id=dom-navigator-pdfviewerenabled data-dfn-type=attribute><code>pdfViewerEnabled</code></dfn> getter steps are to return
  the user agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported-3>PDF viewer supported</a>.</p>

  <hr>

  <p>The <code id=pdf-viewing-support:pluginarray-3><a href=#pluginarray>PluginArray</a></code> interface <a href=https://webidl.spec.whatwg.org/#dfn-support-named-properties id=pdf-viewing-support:support-named-properties data-x-internal=support-named-properties>supports named
  properties</a>. If the user agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported-4>PDF viewer supported</a> is true, then they are
  the <a href=#pdf-viewer-plugin-names id=pdf-viewing-support:pdf-viewer-plugin-names>PDF viewer plugin names</a>. Otherwise, they are the empty list.</p>

  <p>The <code id=pdf-viewing-support:pluginarray-4><a href=#pluginarray>PluginArray</a></code> interface's <dfn data-dfn-for=PluginArray id=dom-pluginarray-nameditem data-dfn-type=method><code>namedItem(<var>name</var>)</code></dfn> method steps are:</p>

  <ol><li><p><a href=https://infra.spec.whatwg.org/#list-iterate id=pdf-viewing-support:list-iterate data-x-internal=list-iterate>For each</a> <code id=pdf-viewing-support:dom-plugin-2><a href=#dom-plugin>Plugin</a></code>
   <var>plugin</var> of <a id=pdf-viewing-support:this-3 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-plugin-objects id=pdf-viewing-support:pdf-viewer-plugin-objects>PDF viewer
   plugin objects</a>: if <var>plugin</var>'s <a href=#concept-plugin-name id=pdf-viewing-support:concept-plugin-name-2>name</a> is
   <var>name</var>, then return <var>plugin</var>.<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:pluginarray-5><a href=#pluginarray>PluginArray</a></code> interface <a id=pdf-viewing-support:supports-indexed-properties href=https://webidl.spec.whatwg.org/#dfn-support-indexed-properties data-x-internal=supports-indexed-properties>supports indexed properties</a>. The
  <a id=pdf-viewing-support:supported-property-indices href=https://webidl.spec.whatwg.org/#dfn-supported-property-indices data-x-internal=supported-property-indices>supported property indices</a> are the <a id=pdf-viewing-support:indices href=https://infra.spec.whatwg.org/#list-get-the-indices data-x-internal=indices>indices</a> of <a id=pdf-viewing-support:this-4 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s
  <a id=pdf-viewing-support:concept-relevant-global-2 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-plugin-objects id=pdf-viewing-support:pdf-viewer-plugin-objects-2>PDF viewer plugin objects</a>.</p>

  <p>The <code id=pdf-viewing-support:pluginarray-6><a href=#pluginarray>PluginArray</a></code> interface's <dfn data-dfn-for=PluginArray id=dom-pluginarray-item data-dfn-type=method><code>item(<var>index</var>)</code></dfn> method steps are:</p>

  <ol><li><p>Let <var>plugins</var> be <a id=pdf-viewing-support:this-5 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-3 href=webappapis.html#concept-relevant-global>relevant global object</a>'s
   <a href=#pdf-viewer-plugin-objects id=pdf-viewing-support:pdf-viewer-plugin-objects-3>PDF viewer plugin objects</a>.<li><p>If <var>index</var> &lt; <var>plugins</var>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size data-x-internal=list-size>size</a>, then
   return <var>plugins</var>[<var>index</var>].<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:pluginarray-7><a href=#pluginarray>PluginArray</a></code> interface's <dfn data-dfn-for=PluginArray id=dom-pluginarray-length data-dfn-type=attribute><code>length</code></dfn> getter steps are to return <a id=pdf-viewing-support:this-6 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s
  <a id=pdf-viewing-support:concept-relevant-global-4 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-plugin-objects id=pdf-viewing-support:pdf-viewer-plugin-objects-4>PDF viewer plugin objects</a>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size-2 data-x-internal=list-size>size</a>.</p>

  <p>The <code id=pdf-viewing-support:pluginarray-8><a href=#pluginarray>PluginArray</a></code> interface's <dfn data-dfn-for=PluginArray id=dom-pluginarray-refresh data-dfn-type=method><code>refresh()</code></dfn> method steps are to do nothing.</p>

  <hr>

  <p>The <code id=pdf-viewing-support:mimetypearray-3><a href=#mimetypearray>MimeTypeArray</a></code> interface <a href=https://webidl.spec.whatwg.org/#dfn-support-named-properties id=pdf-viewing-support:support-named-properties-2 data-x-internal=support-named-properties>supports named
  properties</a>. If the user agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported-5>PDF viewer supported</a> is true, then they are
  the <a href=#pdf-viewer-mime-types id=pdf-viewing-support:pdf-viewer-mime-types>PDF viewer mime types</a>. Otherwise, they are the empty list.</p>

  <p>The <code id=pdf-viewing-support:mimetypearray-4><a href=#mimetypearray>MimeTypeArray</a></code> interface's <dfn data-dfn-for=MimeTypeArray id=dom-mimetypearray-nameditem data-dfn-type=method><code>namedItem(<var>name</var>)</code></dfn> method steps are:</p>

  <ol><li><p><a href=https://infra.spec.whatwg.org/#list-iterate id=pdf-viewing-support:list-iterate-2 data-x-internal=list-iterate>For each</a> <code id=pdf-viewing-support:mimetype-6><a href=#mimetype>MimeType</a></code> <var>mimeType</var> of
   <a id=pdf-viewing-support:this-7 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-5 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects>PDF viewer mime type
   objects</a>: if <var>mimeType</var>'s <a href=#concept-mimetype-type id=pdf-viewing-support:concept-mimetype-type-2>type</a> is
   <var>name</var>, then return <var>mimeType</var>.<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:mimetypearray-5><a href=#mimetypearray>MimeTypeArray</a></code> interface <a id=pdf-viewing-support:supports-indexed-properties-2 href=https://webidl.spec.whatwg.org/#dfn-support-indexed-properties data-x-internal=supports-indexed-properties>supports indexed properties</a>. The
  <a id=pdf-viewing-support:supported-property-indices-2 href=https://webidl.spec.whatwg.org/#dfn-supported-property-indices data-x-internal=supported-property-indices>supported property indices</a> are the <a id=pdf-viewing-support:indices-2 href=https://infra.spec.whatwg.org/#list-get-the-indices data-x-internal=indices>indices</a> of <a id=pdf-viewing-support:this-8 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s
  <a id=pdf-viewing-support:concept-relevant-global-6 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-2>PDF viewer mime type objects</a>.</p>

  <p>The <code id=pdf-viewing-support:mimetypearray-6><a href=#mimetypearray>MimeTypeArray</a></code> interface's <dfn data-dfn-for=MimeTypeArray id=dom-mimetypearray-item data-dfn-type=method><code>item(<var>index</var>)</code></dfn> method steps are:</p>

  <ol><li><p>Let <var>mimeTypes</var> be <a id=pdf-viewing-support:this-9 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-7 href=webappapis.html#concept-relevant-global>relevant global object</a>'s
   <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-3>PDF viewer mime type objects</a>.<li><p>If <var>index</var> &lt; <var>mimeTypes</var>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size-3 data-x-internal=list-size>size</a>, then
   return <var>mimeTypes</var>[<var>index</var>].<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:mimetypearray-7><a href=#mimetypearray>MimeTypeArray</a></code> interface's <dfn data-dfn-for=MimeTypeArray id=dom-mimetypearray-length data-dfn-type=attribute><code>length</code></dfn> getter steps are to return
  <a id=pdf-viewing-support:this-10 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-8 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-4>PDF viewer mime type
  objects</a>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size-4 data-x-internal=list-size>size</a>.</p>

  <hr>

  <p>Each <code id=pdf-viewing-support:dom-plugin-3><a href=#dom-plugin>Plugin</a></code> object has a <dfn id=concept-plugin-name>name</dfn>, which is set when the object is created.</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-4><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-name data-dfn-type=attribute><code>name</code></dfn> getter steps are to return <a id=pdf-viewing-support:this-11 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a href=#concept-plugin-name id=pdf-viewing-support:concept-plugin-name-3>name</a>.</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-5><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-description data-dfn-type=attribute><code>description</code></dfn> getter steps are to return "<code>Portable Document Format</code>".</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-6><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-filename data-dfn-type=attribute><code>filename</code></dfn> getter steps are to return "<code>internal-pdf-viewer</code>".</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-7><a href=#dom-plugin>Plugin</a></code> interface <a href=https://webidl.spec.whatwg.org/#dfn-support-named-properties id=pdf-viewing-support:support-named-properties-3 data-x-internal=support-named-properties>supports named properties</a>. If the user agent's <a href=#pdf-viewer-supported id=pdf-viewing-support:pdf-viewer-supported-6>PDF viewer
  supported</a> is true, then they are the <a href=#pdf-viewer-mime-types id=pdf-viewing-support:pdf-viewer-mime-types-2>PDF viewer mime types</a>. Otherwise, they
  are the empty list.</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-8><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-nameditem data-dfn-type=method><code>namedItem(<var>name</var>)</code></dfn> method steps are:</p>

  <ol><li><p><a href=https://infra.spec.whatwg.org/#list-iterate id=pdf-viewing-support:list-iterate-3 data-x-internal=list-iterate>For each</a> <code id=pdf-viewing-support:mimetype-7><a href=#mimetype>MimeType</a></code> <var>mimeType</var> of
   <a id=pdf-viewing-support:this-12 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-9 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-5>PDF viewer mime type
   objects</a>: if <var>mimeType</var>'s <a href=#concept-mimetype-type id=pdf-viewing-support:concept-mimetype-type-3>type</a> is
   <var>name</var>, then return <var>mimeType</var>.<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:dom-plugin-9><a href=#dom-plugin>Plugin</a></code> interface <a id=pdf-viewing-support:supports-indexed-properties-3 href=https://webidl.spec.whatwg.org/#dfn-support-indexed-properties data-x-internal=supports-indexed-properties>supports indexed properties</a>.
  The <a id=pdf-viewing-support:supported-property-indices-3 href=https://webidl.spec.whatwg.org/#dfn-supported-property-indices data-x-internal=supported-property-indices>supported property indices</a> are the <a id=pdf-viewing-support:indices-3 href=https://infra.spec.whatwg.org/#list-get-the-indices data-x-internal=indices>indices</a> of <a id=pdf-viewing-support:this-13 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s
  <a id=pdf-viewing-support:concept-relevant-global-10 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-6>PDF viewer mime type objects</a>.</p>

  <p>The <code id=pdf-viewing-support:dom-plugin-10><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-item data-dfn-type=method><code>item(<var>index</var>)</code></dfn> method steps are:</p>

  <ol><li><p>Let <var>mimeTypes</var> be <a id=pdf-viewing-support:this-14 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-11 href=webappapis.html#concept-relevant-global>relevant global object</a>'s
   <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-7>PDF viewer mime type objects</a>.<li><p>If <var>index</var> &lt; <var>mimeTypes</var>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size-5 data-x-internal=list-size>size</a>, then
   return <var>mimeTypes</var>[<var>index</var>].<li><p>Return null.</ol>

  <p>The <code id=pdf-viewing-support:dom-plugin-11><a href=#dom-plugin>Plugin</a></code> interface's <dfn data-dfn-for=Plugin id=dom-plugin-length data-dfn-type=attribute><code>length</code></dfn> getter steps are to return
  <a id=pdf-viewing-support:this-15 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-12 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-mime-type-objects id=pdf-viewing-support:pdf-viewer-mime-type-objects-8>PDF viewer mime type
  objects</a>'s <a href=https://infra.spec.whatwg.org/#list-size id=pdf-viewing-support:list-size-6 data-x-internal=list-size>size</a>.</p>

  <hr>

  <p>Each <code id=pdf-viewing-support:mimetype-8><a href=#mimetype>MimeType</a></code> object has a <dfn id=concept-mimetype-type>type</dfn>, which
  is set when the object is created.</p>

  <p>The <code id=pdf-viewing-support:mimetype-9><a href=#mimetype>MimeType</a></code> interface's <dfn data-dfn-for=MimeType id=dom-mimetype-type data-dfn-type=attribute><code>type</code></dfn> getter steps are to return <a id=pdf-viewing-support:this-16 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a href=#concept-mimetype-type id=pdf-viewing-support:concept-mimetype-type-4>type</a>.</p>

  <p>The <code id=pdf-viewing-support:mimetype-10><a href=#mimetype>MimeType</a></code> interface's <dfn data-dfn-for=MimeType id=dom-mimetype-description data-dfn-type=attribute><code>description</code></dfn> getter steps are to return "<code>Portable Document Format</code>".</p>

  <p>The <code id=pdf-viewing-support:mimetype-11><a href=#mimetype>MimeType</a></code> interface's <dfn data-dfn-for=MimeType id=dom-mimetype-suffixes data-dfn-type=attribute><code>suffixes</code></dfn> getter steps are to return "<code>pdf</code>".</p>

  <p>The <code id=pdf-viewing-support:mimetype-12><a href=#mimetype>MimeType</a></code> interface's <dfn data-dfn-for=MimeType id=dom-mimetype-enabledplugin data-dfn-type=attribute><code>enabledPlugin</code></dfn> getter steps are to return
  <a id=pdf-viewing-support:this-17 href=https://webidl.spec.whatwg.org/#this data-x-internal=this>this</a>'s <a id=pdf-viewing-support:concept-relevant-global-13 href=webappapis.html#concept-relevant-global>relevant global object</a>'s <a href=#pdf-viewer-plugin-objects id=pdf-viewing-support:pdf-viewer-plugin-objects-5>PDF viewer plugin
  objects</a>[0] (i.e., the generic "<code>PDF Viewer</code>" one).</p>

  


  <nav><a href=timers-and-user-prompts.html>← 8.6 Timers</a> — <a href=index.html>Table of Contents</a> — <a href=imagebitmap-and-animations.html>8.10 Images →</a></nav>
